package com.vcredit.creditcat.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.vcredit.creditcat.model.AuthSocial;
import com.vcredit.creditcat.persistence.AuthSocialExtMapper;
import com.vcredit.creditcat.persistence.base.AuthSocialMapper;

/**
 * 
 **/
@Service
public class AuthSocialService {
	@Autowired
	private AuthSocialMapper mapper;

	@Autowired
	private AuthSocialExtMapper authSocialExtMapper;

	public void insert(AuthSocial obj) {
		mapper.insert(obj);
	}

	public void update(AuthSocial obj) {
		mapper.update(obj);
	}

	public List<AuthSocial> findAll() {
		return mapper.findAll();
	}

	public List<AuthSocial> find(AuthSocial obj) {
		return mapper.find(obj);
	}

	public AuthSocial findByProcessId(Long processId) {
		return authSocialExtMapper.findByProccessId(processId);
	}

	public List<AuthSocial> findAlreadyLoginAuthSocial() {
		return authSocialExtMapper.findAlreadyLoginAuthSocial();
	}

	public void resetStatus(AuthSocial authSocial) {
		update(authSocial);
	}
}